<div class="col-lg-8">
  <div class="panel panel-primary">
    <div class="panel-heading">组织机构</div>
    <div class="panel-body" ng-init="send('organ.index', {})">
      <p>此处仅显示已经注册登记的组织机构。
        <a class="pull-right" ui-sref="setting.organ.organ.create({})" title="新增机构"><i class="fa fa-plus-square-o fa-2x"></i></a>
      </p>

      <div ui-view></div>

      <p class="text-warning" ng-hide="organ_index.length != 0">
        <i class="fa fa-exclamation-circle fa-4x"></i>
        <span>
          目前还没有已经登记注册的组织机构。
        </span>
      </p>

      <div ng-hide="organ_index.length == 0">
        <table class="table table-hover">
          <tr ng-repeat="e in organ_index">
            <td style="width: 5%;"><i class="fa fa-cube"></i></td>
            <td style="width: 30%;">{{e.name}}</td>
            <td style="width: 20%;"><span class="pull-right">{{e.member.length}} 名成员</span></td>
            <td style="width: 15%;">
              <a href ng-click="send('organ.destroy', { id: e.id });">
                <i class="fa fa-trash text-danger pull-right"></i>
              </a>

              <a ui-sref="setting.organ.organ.create({id: e.id, name: e.name, assign: e.member})">
                <i class="fa fa-edit text-warning pull-right"></i>
              </a>
            </td>
          </tr>
        </table>
      </div>
    </div>
  </div>
</div>
